Hi Tom,
I was running a GCode program that drills a hole using a helix. I found that the program doesn't always complete due to a fault on my SnapAmp SNAP1.
So I wrote a C function to monitor faults on the board. I've included the C source for the function at the end of this email. Originally, I thought that I was getting an overcurrent fault, but it wasn't clear which channel this was occurring.
The program let me know that the first fault that occurs is "Fan". Here is its output:
SNAP1 fault: Fan
Following Error Disabled Axis:2
Axis 2 (Y) and axis 3 (Z) are on SNAP1. I have noticed that it isn't the same axis every time that is disabled due to following error. Sometimes it's axis 2 and sometimes it's axis 3.
I have run this GCode program probably 20 times, and I don't get a fault every time. The fault does not occur at exactly the same place in the movement of the CNC router, but I have noticed that is always occurs more than 1/3 of the way through the movement; in other words, never right away.
The entire movement probably takes about 40 seconds. After it's done, the machine is quiescent for 1 - 2 minutes before moving again.
The board was purchased about 3 months ago. How can I go about diagnosing what the root cause of the fault is?
Thanks,
Hugh
int Snap1FaultExists = 0;
static void CheckSnap(int whichSnap)
{
int s, currentA, currentC;
s = ReadSnapAmp(whichSnap + SNAP_STATUS);
if ((s & 1) != 0) {
if (Snap1FaultExists == 0) {
Snap1FaultExists = 1;
if (s & 2) {
currentA = ReadSnapAmp(whichSnap + SNAP_CURRENT_A0);
currentC = ReadSnapAmp(whichSnap + SNAP_CURRENT_C0);
printf("SNAP1 fault: Y Axis (0) over current, A0 = %d, C0 = %d\n", currentA, currentC);
}
if (s & 4) {
currentA = ReadSnapAmp(whichSnap + SNAP_CURRENT_A1);
currentC = ReadSnapAmp(whichSnap + SNAP_CURRENT_C1);
printf("SNAP1 fault: Z Axis (1) over current, A1 = %d, C1 = %D\n", currentA, currentC);
}
if (s & 8) {
printf("SNAP1 fault: Over Temp 0 (Y Axis)\n");
}
if (s & 0x10) {
printf("SNAP1 fault: Over Temp 1 (Z Axis)\n");
}
if (s & 0x20) {
printf("SNAP1 fault: Fan\n");
}
}
} else if (Snap1FaultExists) {
if ((Y_CHAN->Enable == 0) && (Z_CHAN->Enable == 0)) {
Snap1FaultExists = 0;
printf("Re-enabled Snap Amp fault checking.\n");
}
}
} // CheckSnap